home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacPeople 1997 August 15
/
MACPEOPLE-1997-08-15.ISO.7z
/
MACPEOPLE-1997-08-15.ISO
/
アップル関連
/
ARA PS アップデート
/
モデム用
/
DoCoMo 9600 Ver1.0
/
DoCoMo 9600 Ver1.0
next >
Wrap
Text File
|
1996-07-18
|
10KB
|
506 lines
!**************************************************************************
! DoCoMo Digital DATA/FAX Adapter/Card 9600 FJH11/MAH12 V.1.12. for ARA version 2.0
! 5/19/1994 (original AIWA PV-PF144 Direct)
! 6/ 7/1994 modify
! Written by Kenji Asaka
! 10/4/1995 modify
! Written by N.K.
!
! 'mlts' resource info for this modem:
! byte 1 == 01 -> modem HAS builtin reliability protocols
! byte 2 == 00 -> reserved by Apple
! byte 3 == FE -> max hex chars in varstr 7 (254 dec)
! byte 4 == FE -> max hex chars in varstr 8
! byte 5 == FE -> max hex chars in varstr 9
!
!**************************************************************************
@ORIGINATE
@ANSWER
!******************************************
! set up the modem - label range is 1-10
!
!
!******************************************
! Mac talks to the modem at 19,200 bps.
DTRSet
pause 15
serreset 19200, 0, 8, 1
!------------------------
! reset the serial port
!------------------------
HSReset 0 1 0 0 0 0
!
!
!
settries 0
@LABEL 1
matchclr
matchstr 1 3 "OK¥13¥10"
! &F - recall factory settings
! ¥Q3 - Enable CTS Hardware flow control
! S0=0 - Don't answer calls
! E0 - Turn command echo off
write "AT&F¥¥V1E0S0=0¥¥Q3%C0¥¥N0¥¥X1¥13"
matchread 30
inctries
iftries 2 81
!------------------
! Reset the Modem
! (DoCoMo Digital DATA/FAX Adapter9600 FJH11 SETTING)
!-------------------
DTRSet
pause 10
DTRClear
pause 10
DTRSet
flush
pause 10
jump 1
!
!
!
@LABEL 3
!-----------------------------------------
! Modem responding & configured.
! determine if reliable link is requested.
!-----------------------------------------
! if modem mnp10 link requested (var 4 == 2) then jump label 4
ifstr 4 4 "2"
!
! if modem v42 link requested (var 4 == 1) then jump label 5
ifstr 4 5 "1"
!
! if no modem v42 link requested (var 4 == 0) [same as ARA 1.0] then jump label 9
ifstr 4 9 "0"
!
! else invalid value in var 4; exit w/error
jump 86
!
!
!
@LABEL 4
!--------------------------------
! yes, mnp 10 link is requested.
!--------------------------------
matchclr
matchstr 1 7 "OK¥13¥10"
! ¥N3 - V42-MNP autoreliable mode.
! ¥J0 - Don't adjust Modem-DTE speed to connection speed.
! ¥X0 - Enable MNP10
write "AT¥¥N3¥¥X0¥13"
matchread 300
jump 81
!
!
!
@LABEL 5
!-----------------------------------------------------
! yes, v42 link is requested. OK for LAP-M -> MNP 4.
!-----------------------------------------------------
matchclr
matchstr 1 7 "OK¥13¥10"
! ¥N3 - V42-MNP autoreliable mode.
! ¥J0 - Don't adjust Modem-DTE speed to connection speed.
! ¥X1 - Disable MNP10
write "AT¥¥N3¥¥X1¥13"
matchread 300
jump 81
!
!
!
@LABEL 7
!------------------------------------------------------------------------
! If we DID support compression in the modem, this is where it would go.
!------------------------------------------------------------------------
!
!
!
@LABEL 9
!--------------------------------------------------------------------------
! If speaker on flag is true, jump to label 13. Else turn off the speaker.
!--------------------------------------------------------------------------
ifstr 2 13 "1"
pause 5
matchclr
matchstr 1 13 "OK¥13¥10"
write "ATM0¥13"
matchread 30
jump 81
!*******************************************************************************
! modem ready, so enable answering or originate a call - label range is 11-30
!
!
!*******************************************************************************
@LABEL 13
pause 5
ifANSWER 71
!
! if normal dialing (parm 6 == 0) jump to 19
ifstr 6 19 "0"
!
! if blind dialing (parm 6 == 1) jump to 17
ifstr 6 17 "1"
!
! if manual dialing (parm 6 == 2) jump to 15
ifstr 6 15 "2"
!
! else invalid value in var 6; exit w/error
jump 86
!
!
!
@label 15
note "手動ダイアル中。" 3
! "Manual dialing initiated" 3
! X1 to ignore dialtone & busy for manual dialing, D to dial
write "ATX1D ¥13"
jump 32
!
!
!
@label 17
note "ダイアルトーンを無視してダイアル中。" 3
! "Dialing without tone" 3
matchclr
matchstr 1 19 "OK¥13¥10"
! X3 to ignore dialtone for blind dialing
write "ATX3¥13"
matchread 30
jump 81
!
!
!
@label 19
! this is where we break up long dialstrings
!
! parm 1 is always the full dialstring from the conn doc
note "^1 をダイアル中。" 3
! "Dialing ^1" 3
! parm 3 is always "p" for pulse & "t" for tone
!
! if parm 8 == blank (complete dialstring in parm 7)
! then jump to label 27 & dial parm 7
ifstr 8 27 " "
!
! if parm 9 == blank (complete dialstring in parms 7 & 8)
! then jump to label 24 & dial parm 7 & 8
ifstr 9 24 " "
!
! else dial parm 7 & 8 & 9 (complete dialstring in parms 7, 8 & 9)
matchclr
matchstr 1 21 "OK¥13¥10"
! parm 7 holds first string fragment
write "ATD^3^7¥13"
matchread 400
! modem not responding; bailout.
jump 81
!
!
!
@label 21
! parm 8 holds second string fragment
matchclr
matchstr 1 22 "OK¥13¥10"
write "ATD^3^8¥13"
matchread 400
! modem not responding; bailout.
jump 81
!
!
!
@label 22
! parm 9 holds last string fragment
write "ATD^3^9¥13"
jump 32
!
!
!
!
@label 24
matchclr
matchstr 1 25 "OK¥13¥10"
! parm 7 holds first string fragment
write "ATD^3^7¥13"
matchread 400
! modem not responding; bailout.
jump 81
!
!
!
@label 25
! parm 8 holds last string fragment
write "ATD^3^8¥13"
jump 32
!
!
!
@label 27
! parm 7 holds entire string
write "ATD^3^7¥13"
jump 32
!***********************************************
! connecting - label range is 34-60
!
!
!***********************************************
@LABEL 32
matchclr
!
matchstr 1 45 "CONNECT SERIAL 19200/"
!
matchstr 2 46 "PROTOCOL:NONE"
matchstr 3 47 "MNP <NONE>"
matchstr 4 47 "MNP <NONE>"
matchstr 5 48 "MNP4 <V.42bis>"
matchstr 6 48 "MNP4 <V.42bis>"
matchstr 7 49 "MNP5"
matchstr 8 50 "MNP10 <NONE>"
matchstr 9 51 "MNP10 <MNP5>"
matchstr 10 52 "MNP10 <V.42bis>"
matchstr 11 53 "LAPM <NONE>"
matchstr 12 53 "LAPM <NONE>"
matchstr 13 54 "LAPM <V.42bis>"
matchstr 14 54 "LAPM <V.42bis>"
!
matchstr 15 55 "/CARRIER 1200¥13¥10"
matchstr 16 56 "/CARRIER 2400¥13¥10"
matchstr 17 57 "/CARRIER 4800¥13¥10"
matchstr 18 58 "/CARRIER 7200¥13¥10"
matchstr 19 59 "/CARRIER 9600¥13¥10"
matchstr 20 60 "/CARRIER 12000¥13¥10"
matchstr 21 61 "/CARRIER 14400¥13¥10"
!
! for Digital Mova Connect-Result-Code
matchstr 22 62 "CONNECT SERIAL 19200¥13¥10"
!
! other connect speeds go below here
!
matchstr 23 72 "RING¥13¥10"
!
matchstr 24 82 "NO DIALTONE¥13¥10"
matchstr 25 83 "NO CARRIER¥13¥10"
matchstr 26 83 "ERROR¥13¥10"
matchstr 27 84 "BUSY¥13¥10"
matchstr 28 85 "NO ANSWER¥13¥10"
matchstr 29 87 "/CARRIER 300¥13¥10"
matchstr 30 88 "DELAYED¥13¥10"
matchstr 31 88 "NOT READY¥13¥10"
matchstr 32 89 "LOW BATTERY¥13¥10"
!
matchread 700
ifANSWER 32
jump 81
!------------------------------------------------------------
! THIS v32b modem has been setup to do cts handshaking,
! and we assume that a cts handshaking cable is being used,
! so we leave the serial port set to 19,200 bps.
!------------------------------------------------------------
!
@LABEL 45
note "接続しました" 3
! "Communicating at 19200 bps." 2
CommunicatingAt 19200
jump 32
!
@LABEL 46
note "ノーマルモードで接続しました" 3
jump 32
!
@LABEL 47
note "MNP4で接続しました" 3
jump 32
!
@LABEL 48
note "MNP&V.42bisで接続しました" 3
jump 32
!
@LABEL 49
note "MNP5で接続しました" 3
jump 32
!
@LABEL 50
note "MNP10で接続しました" 3
jump 32
!
@LABEL 51
note "MNP10&MNP5で接続しました" 3
jump 32
!
@LABEL 52
note "MNP10&V.42bisで接続しました" 3
jump 32
!
@LABEL 53
note "LAPMで接続しました" 3
jump 32
!
@LABEL 54
note "LAPM&V.42bisで接続しました" 3
jump 32
!
@LABEL 55
note "1200bpsで接続中(相手側通信速度)" 3
jump 68
!
@LABEL 56
note "2400bpsで接続中(相手側通信速度)" 3
jump 68
!
@LABEL 57
note "4800bpsで接続中(相手側通信速度)" 3
jump 68
!
@LABEL 58
note "7200bpsで接続中(相手側通信速度)" 3
jump 68
!
@LABEL 59
note "9600bpsで接続中(相手側通信速度)" 3
jump 68
!
@LABEL 60
note "12000bpsで接続中(相手側通信速度)" 3
jump 68
!
@LABEL 61
note "14400bpsで接続中(相手側通信速度)" 3
jump 68
!
@LABEL 62
note "デジタル携帯電話と接続しました" 3
CommunicatingAt 19200
jump 68
!
!
!
@LABEL 68
! turn on cts handshaking.
HSReset 0 1 0 0 0 0
!
ifANSWER 69
pause 30
@LABEL 69
exit 0
!************************************************************
! @ANSWER
! Set the modem to answer on 1st ring - label range is 71-80
!
!************************************************************
@LABEL 71
matchclr
matchstr 1 32 "OK¥13¥10"
write "ATS0=1¥13"
matchread 30
jump 81
!
@LABEL 72
ifORIGINATE 32
! claim the serial port
userhook 1
note "電話に応対しています。" 2
! "Answering phone..." 2
jump 32
!************************************************
! error messages - label range is 81-100
!
!
!************************************************
! Modem Not Responding
@LABEL 81
exit -6019
!
! No Dial Tone
@LABEL 82
exit -6020
!
! No Carrier or Error
@LABEL 83
exit -6021
!
! Busy
@LABEL 84
exit -6022
!
! No Answer
@LABEL 85
exit -6023
!
! varstring invalid value
@LABEL 86
exit -6027
!
! Connect 300bps
@LABEL 87
exit -6002 "ARA は 300bps の接続に対応していません。"
! -6002 "ARA doesn't support 300bps connection."
!
! DELAYED
@LABEL 88
exit -6022 "リダイヤル規制中です。1分後に発信して下さい"
!
! LOW BATTERY
@LABEL 89
exit -6022 "アダプタの電池を交換して下さい"
!
!
!********************************************
! Hang up the modem - label range is 101-120
!********************************************
@HANGUP
@LABEL 102
settries 0
HSReset 0 0 0 0 0 0
@LABEL 105
!----------------------------
! firstly try escape sequence
!----------------------------
matchclr
matchstr 1 108 "OK¥13¥10"
pause 10
write "+++"
matchread 15
!
@LABEL 108
!-------------------
! secondly try ATH
!-------------------
matchclr
matchstr 1 111 "NO CARRIER¥13¥10"
matchstr 2 111 "OK¥13¥10"
matchstr 3 111 "ERROR¥13¥10"
write "ATH¥13"
matchread 30
inctries
iftries 3 81
!---------------------------------------
! finaly try On-to-Off DTR transitions
! (DoCoMo Digital DATA/FAX Adapter9600 FJH11 SETTING)
!---------------------------------------
DTRSet
pause 10
DTRClear
pause 10
DTRSet
flush
pause 10
jump 105
!------------------------------
! recall the factory settings.
!------------------------------
@LABEL 111
pause 15
matchclr
matchstr 1 114 "OK¥13¥10"
write "AT&F¥¥V1E0S0=0¥¥Q3¥13"
matchread 30
jump 81
!
@LABEL 114
exit 0
!*********************************************************
! labels 121-128 are reserved for future emergency hacks
!
!
!********************************************************